dataModel = new ht.DataModel();
graphView = new ht.graph.GraphView(dataModel);
    
/**
 * 页面初始化
 * @returns
 */
function init() {
	graphView.addToDOM();
    graphView.deserialize('displays/bigScreen/operationSecondLevel.json', function(json, dm, gv, datas) {
    	loadData();
    });
}

//加载各类数据
function loadData(){
	//财务
	$.ajax({
		type:'post',
		url:baseUrl+"/oper/queryYYCB",
		success:function(data){
			console.log(data);
			let node = dataModel.getDataByTag("yypwsr");
			node.s("text",data.OPTG_TICK_RVN);
		}
	});
	//质量
	$.ajax({
		type:'post',
		url:baseUrl+"/oper/queryQuality",
		success:function(data){
			console.log(data);
			let node = dataModel.getDataByTag("dxl");
			node.s("text",data.conversion_rate);
			let node1 = dataModel.getDataByTag("zdl");
			node1.s("text",data.quality);
		}
	});
	//
	$.ajax({
		type:'post',
		url:baseUrl+"/oper/queryData",
		success:function(data){
			console.log(data);
			let node = dataModel.getDataByTag("zkxlc");
			node.s("text",data.ln_f_opn_unt_nr);
			let node1 = dataModel.getDataByTag("yylc");
			node1.s("text",data.ln_totl_unt_km);
			let node2 = dataModel.getDataByTag("sjdm");
			node2.s("text",data.trn_hr_hgh_max_crdd_dgr);
			let node3 = dataModel.getDataByTag("qkpc");
			node3.s("text",data.ln_cler_cust_nr);
			let node4 = dataModel.getDataByTag("gfjg");
			node4.s("text",data.ln_hr_min_dptr_intvl );
			let node5 = dataModel.getDataByTag("kyqd");
			node5.s("text",(data.intensity_passenger+'').substring(0,4));
			let node6 = dataModel.getDataByTag("lckyl");
			node6.s("text",data.train_availability);
			let node7 = dataModel.getDataByTag("lctyl");
			node7.s("text",data.train_utilization_rate);
			let node8 = dataModel.getDataByTag("yyzhnh");
			node8.s("text",data.optg_dy_nr);
			let node8x = dataModel.getDataByTag("yyzhnhx");
			node8x.s("text",data.optg_dy_nr);
//			let node9 = dataModel.getDataByTag("yyxlzcd");
//			node9.s("text",data.ln_optg_lgt);
//			let node10 = dataModel.getDataByTag("pscls");
//			node10.s("text",data.ln_statn_nr);
//			let node11 = dataModel.getDataByTag("yyczs");
//			node11.s("text",data.ln_atch_veh_unt_nr);
		}
	});
	
	$.ajax({
		type:'post',
		url:baseUrl+"/oper/queryData1",
		success:function(data){
			console.log(data);
			let node = dataModel.getDataByTag("ckmydzs");
			node.s("text",data.pasgr_stsfctn_rate.trim().length == 0?"--":data.pasgr_stsfctn_rate);
			let node1 = dataModel.getDataByTag("ckyztsl");
			node1.s("text",data.ckyztsl);
			let node2 = dataModel.getDataByTag("spjkkd");
			node2.s("text",data.spjkkd);
			let node3 = dataModel.getDataByTag("czjkkd");
			node3.s("text",data.czjkkd);
			let node4 = dataModel.getDataByTag("jczzjkkd");
			node4.s("text",data.jczzjkkd );
			let node5 = dataModel.getDataByTag("zdftkkd");
			node5.s("text",data.zdftkkd);
			let node6 = dataModel.getDataByTag("czdtkkd");
			node6.s("text",data.czdtkkd);
			let node7 = dataModel.getDataByTag("pbmkkd");
			node7.s("text",data.pbmkkd);
			let node8 = dataModel.getDataByTag("kyl");
			node8.s("text",data.kyl);
			let node9 = dataModel.getDataByTag("ynlyl");
			node9.s("text",data.ynlyl.trim().length == 0?"--":data.ynlyl);
		}
	});
	
	$.ajax({
		type:'post',
		url:baseUrl+"/oper/queryData2",
		success:function(data){
			console.log(data);
			let node = dataModel.getDataByTag("yysj");
			node.s("text",data.optg_dy_nr);
		}
	});
	
}
